From: matthew <matthew@owens.tech>
Date: Sun, 29 Jul 2018 22:09:41 +0000 (+0000)
Subject: fixed board orientation
X-Git-Url: https://git.owens.tech/assets/lich_lifts_title_slice.png%20%22Lich%20Lifts%22/assets/lich_lifts_title_slice.png%20%22Lich%20Lifts%22/git?a=commitdiff_plain;h=ce71a32e7a864e063d83b2b7517d3ef38d147b2f;p=csrpg.git

fixed board orientation
---

diff --git a/common/board.c b/common/board.c
index 7b37abd..c8feac7 100644
--- a/common/board.c
+++ b/common/board.c
@@ -16,16 +16,10 @@ Board *board_init(int sizex, int sizey)
 	b->dimensions.y = sizey;
 	b->tiles = malloc(sizet * sizeof(Tile));
 
-	//for(int x = 0; x < sizex; ++x){
-	//	b->tiles[x] = malloc(sizey * sizeof(Tile));
-	//	for(int y = 0; y < sizey; ++y){
-	//		b->tiles[x][y] = tile_init(point3i(x,y,1), PLAINS);
-	//	}
-	//}
 	for(int x = 0; x < sizex; ++x){
 		for(int y = 0; y < sizey; ++y){
 
-			b->tiles[x + (y * sizey)] =
+			b->tiles[y * sizex + x] =
 			tile_init(point3i(x,y,1), PLAINS);
 		}
 	}
diff --git a/nogl/main.c b/nogl/main.c
index 6a30f67..902f4d9 100644
--- a/nogl/main.c
+++ b/nogl/main.c
@@ -34,13 +34,13 @@ int main()
 	Point2i loc;
 	Tile* sel = NULL;
 
-	for(int x = 0; x < 5; ++x){
-		for(int y = 0; y < 3; ++y){
+	for(int y = 0; y < 3; ++y){
+		for(int x = 0; x < 5; ++x){
 			loc.x = x;
 			loc.y = y;
 			sel = board_tile_at(board, loc);
 			if(sel == NULL){
-				printf("N");
+				printf("X");
 			} else {
 				printf("#");
 			}